<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv=Content-Type content="text/html; charset=utf-8">
    <title>小乖乖问答系统</title>
    <link rel="icon" href="/favicon.ico">
    <link rel="stylesheet" href="/css/publish.css">
    <link rel="stylesheet" href="/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/css/bootstrap-theme.min.css"/>
    <script src="/js/jquery-3.4.1.js" type="application/javascript"></script>
    <script src="/js/bootstrap.min.js" type="application/javascript"></script>
</head>
<body class="main-img">
<nav th:insert="~{common/head :: comment_header}">

</nav>
<div class="container-fluid main">
    <div class="row">
        <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12">
            <h2><span class="glyphicon glyphicon-list" aria-hidden="true"></span>&nbsp;发现</h2>
            <hr/>
            <!--            style="margin-top: -0.5px !important;"-->
            <div class="media" th:each="dto : ${pageDto.dtoList}">
                <div class="media-left">
                    <a href="#">
                        <img width="50px" height="50px" class="media-object img-thumbnail"
                             th:src="@{${dto.user.avatarUrl}}" onerror="this.src='/images/IMG_0044.jpg';">
                    </a>
                </div>
                <div class="media-body">
                    <h4 class="media-heading">
                        <a th:href="@{'/question/'+${dto.question.id}}" aria-label="questionTitle"
                           th:text="${dto.question.questionTitle}"></a>
                    </h4>
                    <!--                    <span th:text="${dto.question.description}"></span>-->
                    <!--                    <br/>-->
                    <span class="text-desc">
                           <span th:text="${dto.question.commentCount}"></span>&nbsp;个回复
                           &nbsp; • <span th:text="${dto.question.viewCount}"></span>&nbsp;次浏览
                           &nbsp; • <span th:text="${#dates.format(dto.question.gmtCreate, 'yyyy-MM-dd HH:mm:ss')}">1个小时前</span>
                        </span>
                </div>
                <hr/>
            </div>
            <!--style="margin-top: -28.5px;height: 66px;"-->
            <nav aria-label="Page navigation navbar-fixed-bottom"
                 style="margin-top: -28.5px;height: 66px;margin-bottom: -20px;">
                <ul class="pagination">
                    <li th:if="${pageDto.showFirstPage}">
                        <a th:href="@{/(page=1,search=${search})}" aria-label="FirstPage">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>
                    <li th:if="${pageDto.showPrevious}">
                        <a th:href="@{/(page=${page-1},search=${search})}" aria-label="Previous">
                            <span> &lt; </span>
                        </a>
                    </li>

                    <li th:each="pages : ${pageDto.pages}" th:class="${pages == page}? 'active' : ''">
                        <a th:href="@{/(page=${pages},search=${search})}">
                            [[${pages}]]
                        </a>
                    </li>

                    <li th:if="${pageDto.showNet}">
                        <a th:href="@{/(page=${page}+1,search=${search})}" aria-label="Next">
                            <span> &gt; </span>
                        </a>
                    </li>
                    <li th:if="${pageDto.showEndPage}">
                        <a th:href="@{/(page=${pageDto.totalPage},search=${search})}" aria-label="EndPage">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </li>
                </ul>
            </nav>
            <hr style="margin-bottom: 0px !important;"/>
        </div>
        <div class="col-lg-3 col-md-12 col-sm-12 col-xs-12">

            <h3><span class="glyphicon glyphicon-bullhorn" aria-hidden="true"></span>&nbsp;<span>热门话题</span></h3>
            <hr />
            <img class="col-lg-12 col-md-12 col-sm-12 col-xs-12 img-thumbnail" src="/images/IMG_0142(20200313-125208).JPG">
        </div>
    </div>
</div>
<nav th:insert="~{common/footer :: comment_footer}"></nav>
</body>
<!--<script>-->
<!--    window.onload = function () {-->
<!--        debugger;-->
<!--        var item = window.localStorage.getItem("closable");-->
<!--        if (item == "notnull") {-->
<!--            window.close();-->
<!--            window.localStorage.removeItem("closable");-->
<!--        }-->
<!--    }-->
<!--</script>-->
</html>